#include "SMPPDeliveryFailureReason.hpp"

using namespace smpp::pdu;

DeliveryFailureReason::DeliveryFailureReason(const quint8 nValue):
TLV(TLVtags::TAG_DELIVERY_FAILURE_REASON,1),_Value(nValue){}

DeliveryFailureReason::DeliveryFailureReason(
const DeliveryFailureReason &nDeliveryFailureReason):
TLV(nDeliveryFailureReason),_Value(nDeliveryFailureReason.getValue()){}

bool DeliveryFailureReason::operator ==(
	const DeliveryFailureReason &nDeliveryFailureReason) const{
	return (TLV::operator == (nDeliveryFailureReason) && 
			_Value == nDeliveryFailureReason.getValue());
}

bool DeliveryFailureReason::operator !=(
	const DeliveryFailureReason &nDeliveryFailureReason) const{
	return !this->operator == (nDeliveryFailureReason);
}

DeliveryFailureReason &DeliveryFailureReason::operator = (
	const DeliveryFailureReason &nDeliveryFailureReason){
	if(*this == nDeliveryFailureReason)
		return *this;
	TLV::operator = (nDeliveryFailureReason);
	_Value = nDeliveryFailureReason.getValue();
	return *this;
}

void DeliveryFailureReason::setValue(const quint8 nValue){
	_Value = nValue;
}

const quint8 DeliveryFailureReason::getValue() const{
	return _Value;
}
